package com.orange.handler.impl;

import java.sql.SQLException;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.orange.dbhelp.page.Page;
import com.orange.handler.AuthOrgUserService;
import com.orange.modules.dao.AuthOrgUserRepository;
import com.orange.modules.entity.manage.AuthOrgUser;

@Service
public class AuthOrgUserServiceImpl implements AuthOrgUserService{
	
	@Autowired
	private AuthOrgUserRepository authOrgUserRepository;

	@Override
	public AuthOrgUser getAuthOrgUserByAccount(String account,String type)
			throws SQLException {
		AuthOrgUser aou = authOrgUserRepository.getAuthOrgUserByAccount(account,type);
		return aou;
	}

	/* (non-Javadoc)
	 * @see com.orange.handler.AuthOrgUserService#saveAuthOrgUserInfo(com.orange.modules.entity.manage.AuthOrgUser)
	 */
	@Override
	public void saveAuthOrgUserInfo(AuthOrgUser a) {
		authOrgUserRepository.saveAuthOrgUserInfo(a);
		
	}

	/* (non-Javadoc)
	 * @see com.orange.handler.AuthOrgUserService#queryAuthOrgUserById(java.lang.String)
	 */
	@Override
	public AuthOrgUser queryAuthOrgUserById(String pid) {
		AuthOrgUser a=authOrgUserRepository.queryAuthOrgUserById(pid);
		return a;
	}

	@Override
	public Page<AuthOrgUser> queryAuthOrgUserByPage(Map<String, String> map)
			throws NumberFormatException, SQLException {
		Page<AuthOrgUser> page = authOrgUserRepository.queryAuthOrgUserByPage(map);
		return page;
	}

	@Override
	public void deleteAuthOrgUserInfo(String pid) {
		authOrgUserRepository.deleteAuthOrgUserInfo(pid);
		
	}

}
